<?php
$http = new Swoole\Http\Server("0.0.0.0", 9501);
$http->on('request', function ($request, $response) {
    $name = $request->get['name'];
    exec("./test.sh ".$name,$output);
    print_r($output);
    $rest = json_encode($output,true);
    $response->end("<h1>Hello Swoole. #$name".rand(1000, 9999)."$rest</h1>");
});
$http->start();